Fix compilation-mode matches for csharp-mode (bug#78128)
authorJostein Kjønigsen <jostein@kjonigsen.net>
Fri, 25 Apr 2025 13:29:31 +0000 (15:29 +0200)
committerYuan Fu <casouri@gmail.com>
Thu, 1 May 2025 07:50:05 +0000 (00:50 -0700)
* lisp/progmodes/csharp-mode.el:
(csharp-compilation-re-dotnet-error):
(csharp-compilation-re-dotnet-warning): Ignore leading whitespace.

lisp/progmodes/csharp-mode.el

index 55ae7db714b1303a83829d6b910af8709697f33d..3e372546eb60218ac461f225a0b3de04fb5b4adc 100644 (file)
@@ -591,10 +591,10 @@ compilation and evaluation time conflicts."
   "Regexp to match compilation warning from xbuild.")
 
 (defconst csharp-compilation-re-dotnet-error
-  "\\([^\r\n]+\\) : error [A-Z]+[0-9]+:")
+  "[[:blank:]]*\\([^\r\n]+\\) : error [A-Z]+[0-9]+:")
 
 (defconst csharp-compilation-re-dotnet-warning
-  "\\([^\r\n]+\\) : warning [A-Z]+[0-9]+:")
+  "[[:blank:]]*\\([^\r\n]+\\) : warning [A-Z]+[0-9]+:")
 
 (defconst csharp-compilation-re-dotnet-testfail
   (concat